package com.fortune.controller;

import java.util.List;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fortune.base.BaseAPIExcution;
import com.fortune.dto.in.cUserMgt.CUserAddDto;
import com.fortune.dto.in.cUserMgt.CUserEditDto;
import com.fortune.dto.in.cUserMgt.CUserLogableDto;
import com.fortune.vo.cUserMgt.CUser;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
@Api(value = "cUser", description="客户账户管理", tags = {"客户账户管理"})
@RestController
@RequestMapping("cUserMgt")
@Validated
public class CUserMgtController{
	
	@ApiOperation(value = "客户账户列表", nickname = "cUserList", notes = "")
    @GetMapping(value = "list",
        produces = { MediaType.APPLICATION_JSON_VALUE })
	public BaseAPIExcution<List<CUser>> list() {
		return null;
	}

	@ApiOperation(value = "添加客户", nickname = "cUserAdd", notes = "")
    @PostMapping(value = "add",
        produces = { MediaType.APPLICATION_JSON_VALUE },
        consumes = { MediaType.APPLICATION_JSON_VALUE })
	public BaseAPIExcution<Void> add(@Validated @RequestBody CUserAddDto addDto) {
		return null;
	}
	
	@ApiOperation(value = "编辑客户", nickname = "cUserEdit", notes = "")
    @PutMapping(value = "edit",
        produces = { MediaType.APPLICATION_JSON_VALUE },
        consumes = { MediaType.APPLICATION_JSON_VALUE })
	public BaseAPIExcution<Void> edit(@Validated @RequestBody CUserEditDto editDto) {
		return null;
	}
	
	@ApiOperation(value = "删除客户", nickname = "cUserDelete", notes = "")
	@ApiImplicitParam(name="userId", value="用户id",paramType="query",dataType="string")
    @DeleteMapping(value = "delete",
        produces = { MediaType.APPLICATION_JSON_VALUE })
	public BaseAPIExcution<Void> delete(@Validated @NotBlank(message="用户id不能为空") String userId) {
		return null;
	}
	
	@ApiOperation(value = "重置客户密码", nickname = "cUserResetPassword", notes = "")
	@ApiImplicitParam(name="userId", value="用户id",paramType="query",dataType="string")
    @PutMapping(value = "resetPassword",
            produces = { MediaType.APPLICATION_JSON_VALUE })
	public BaseAPIExcution<Void> resetPassword(@Validated @NotBlank(message="用户id不能为空") String userId) {
		return null;
	}
	
	@ApiOperation(value = "设置客户是否允许登录", nickname = "cUserLogableSetting", notes = "")
    @PutMapping(value = "logableSetting",
        produces = { MediaType.APPLICATION_JSON_VALUE },
        consumes = { MediaType.APPLICATION_JSON_VALUE })
	public BaseAPIExcution<Void> logableSetting(@Validated @RequestBody CUserLogableDto logableDto) {
		return null;
	}
}
